/**
 * Created by IntelliJ IDEA
 *
 * @author zhengjie
 * @Date:2022/1/7 10:20
 * @Version 1.0
 */
package com.zj.ssm.controller;


import com.zj.ssm.result.AjaxResult;
import com.zj.ssm.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("admin")
public class AdminController {

        @Autowired
        private AdminService adminService;

        @RequestMapping("login")
        public AjaxResult login(String username,String password){
            return adminService.login(username,password);
        }

        @RequestMapping("getInfo")
        public AjaxResult getInfo(){
            return adminService.getInfo();
        }

        @RequestMapping("cipher")
        public AjaxResult cipher(String password,String newPassword,String passwordNew){
            return adminService.cipher(password,newPassword,passwordNew);
        }

        @RequestMapping("getid")
        public AjaxResult getid(){
            return adminService.getid();
        }

}
